<h2>Edit photo details</h2>

<%= link_to image_tag(@photo.public_filename('thumb')), 
            article_photo_path(:article_id => @photo.article, :id => @photo) %>

<%= error_messages_for :photo %>

<% form_for(:photo, 
            :url => article_photo_path(:article_id => @photo.article, :id => @photo), 
            :html => { :method => :put }) do |f| %>
  <p>Title:<br /><%= f.text_field 'title' %></p>
  <p>Description:<br /><%= f.text_area 'body', :rows => 6, :cols => 40 %></p>
  <p><%= submit_tag "Save" %> or <%= link_to 'cancel', article_photos_path %></p>
<% end %>
